package com.hqyj.hrms.modules.personnel.controller;


import com.hqyj.hrms.modules.personnel.entity.Contract;
import com.hqyj.hrms.modules.personnel.entity.Employee;
import com.hqyj.hrms.modules.personnel.service.ContractService;
import com.hqyj.hrms.modules.personnel.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zyj
 * @since 2021-10-02
 */
@RestController
@RequestMapping("/contract")
public class ContractController {
    @Autowired
    ContractService contractService;

    //查询
    @GetMapping("/list")
    public HashMap<String, Object> list(Contract contract) {
        return contractService.list(contract);
    }

    @GetMapping("/add")
    public HashMap<String, Object> add(Contract contract) {
        return contractService.add(contract);
    }

    @GetMapping("/update")
    public HashMap<String, Object> update(Contract contract) {
        return contractService.update(contract);
    }

    @GetMapping("/del")
    public HashMap<String, Object> del(Integer id) {
        return contractService.del(id);
    }


}

